package com.bm.product.controller;


import com.bm.product.entity.Category;
import com.bm.product.entity.CategoryQuery;
import com.bm.product.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * ;(212_category)控制层
 * @author : heimi
 * @date : 2025-4-14
 */
@RestController
@RequestMapping("/api/category")
@CrossOrigin( origins = "*")
public class CategoryController {
    @Autowired
    private CategoryService categoryService;
    
    /** 
     * 查询接口
     */
     @GetMapping
     public List<Category> select(CategoryQuery query){
         System.out.println("查询参数："+query);
        return categoryService.select(query);
    }
    
//    @PostMapping
//    public Integer insert(@RequestBody Category product){
//       return categoryService.insert(product);
//    }
//
//    @PutMapping
//    public Integer update(@RequestBody Category product){
//        return categoryService.update(product);
//    }
//
//    @DeleteMapping
//    public Integer delete(Integer id){
//        return categoryService.delete(id);
//    }
}